<template>
    <el-dialog title="版本号" :visible.sync="dialogTableVisible" width="800px">
        <el-table :data="resultImgList" max-height="500px">
            <el-table-column prop="versionNumber" label="版本号" ></el-table-column>
            <el-table-column prop="updateTime" label="修改时间" >
                <template slot-scope="scope" v-if="scope.row.updateTime">
                    {{scope.row.updateTime | formatDate}}
                </template>
            </el-table-column>
            <el-table-column prop="updateUserName" label="修改人"></el-table-column>
            <el-table-column label="操作" width="80px">
                <template slot-scope="scope">
                    <el-button
                        type="primary"
                        size="mini"
                        @click="$emit('getResultImgJson',scope.row),dialogTableVisible = false"
                    >详情</el-button>
                </template>
            </el-table-column>
        </el-table>
    </el-dialog>
</template>
<script>
import { formatDate } from "assets/js/date";
export default {
    props: {
        resultImgList: Array
    },
    data() {
        return {
            dialogTableVisible: false
        };
    },
    filters: {
        formatDate(data) {
            var date = new Date(data);
            return formatDate(date, "yyyy-MM-dd hh:mm:ss");
        },
    },
};
</script>